void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200); // Ignored by Maple. But needed by boards using hardware serial via a USB to Serial adaptor
  pinMode(PC13, OUTPUT);
  pinMode(PB9,OUTPUT);
//  digitalWrite(PC13, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:
  int responsedata = Serial.read();
  if (responsedata == 49) { // 判断处是转成ASCll来判断的
      digitalWrite(PC13, LOW);
    Serial.write(responsedata);
    Serial.print(":on ");
    // 开灯 至于高位
  
  }
  if (responsedata == 48) {
      digitalWrite(PC13, HIGH);
    Serial.write(responsedata);
    Serial.print(":off ");
  }

    if (responsedata == 51) {
      digitalWrite(PB9, LOW);
    Serial.write(responsedata);
    Serial.print(":on ");
    // 开灯 至于高位
  
  }
  if (responsedata == 50) {
      digitalWrite(PB9, HIGH);
    Serial.write(responsedata);
    Serial.print(":off ");
  }
  
  delay(100);
}
